package yaprnn.gui.view;

public class TrainingView extends javax.swing.JFrame {

    private static final long serialVersionUID = -2044374809203547515L;

    public TrainingView() {
        initComponents();
    }

    public javax.swing.JButton getToolClearGraph() {
        return toolClearGraph;
    }

    public javax.swing.JSpinner getOptionBatchsize() {
        return optionBatchsize;
    }

    public javax.swing.JPanel getGraphPanel() {
        return graphPanel;
    }

    public javax.swing.JRadioButton getOptionDynamicAdjustment() {
        return optionDynamicAdjustment;
    }

    public javax.swing.JSpinner getOptionDynamicMultiplier() {
        return optionDynamicMultiplier;
    }

    public javax.swing.JSpinner getOptionLearningRate() {
        return optionLearningRate;
    }

    public javax.swing.JSpinner getOptionMaxError() {
        return optionMaxError;
    }

    public javax.swing.JSpinner getOptionMaxIterations() {
        return optionMaxIterations;
    }

    public javax.swing.JCheckBox getOptionModifyLearningrate() {
        return optionModifyLearningrate;
    }

    public javax.swing.JSpinner getOptionMomentum() {
        return optionMomentum;
    }

    public javax.swing.JSpinner getOptionDynamicReductionfactor() {
        return optionDynamicReductionfactor;
    }

    public javax.swing.JSpinner getOptionStaticReductionfactor() {
        return optionStaticReductionfactor;
    }

    public javax.swing.JRadioButton getOptionStaticAdjustment() {
        return optionStaticAdjustment;
    }

    public javax.swing.JSpinner getOptionStaticIterations() {
        return optionStaticIterations;
    }

    public javax.swing.JComboBox getOptionTrainingMethod() {
        return optionTrainingMethod;
    }

    public javax.swing.JCheckBox getOptionUseMomentum() {
        return optionUseMomentum;
    }

    public javax.swing.JTabbedPane getPreferencesTabs() {
        return preferencesTabs;
    }

    public javax.swing.JButton getToolTrain() {
        return toolTrain;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jToolBar1 = new javax.swing.JToolBar();
        toolTrain = new javax.swing.JButton();
        toolClearGraph = new javax.swing.JButton();
        jSplitPane1 = new javax.swing.JSplitPane();
        preferencesTabs = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        optionTrainingMethod = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        optionLearningRate = new javax.swing.JSpinner();
        jLabel3 = new javax.swing.JLabel();
        optionMaxIterations = new javax.swing.JSpinner();
        jLabel4 = new javax.swing.JLabel();
        optionMaxError = new javax.swing.JSpinner();
        optionModifyLearningrate = new javax.swing.JCheckBox();
        optionUseMomentum = new javax.swing.JCheckBox();
        optionBatchsize = new javax.swing.JSpinner();
        jLabel10 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        optionDynamicAdjustment = new javax.swing.JRadioButton();
        jLabel6 = new javax.swing.JLabel();
        optionDynamicMultiplier = new javax.swing.JSpinner();
        jLabel5 = new javax.swing.JLabel();
        optionDynamicReductionfactor = new javax.swing.JSpinner();
        optionStaticAdjustment = new javax.swing.JRadioButton();
        jLabel9 = new javax.swing.JLabel();
        optionStaticIterations = new javax.swing.JSpinner();
        jLabel8 = new javax.swing.JLabel();
        optionStaticReductionfactor = new javax.swing.JSpinner();
        jPanel5 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        optionMomentum = new javax.swing.JSpinner();
        graphPanel = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Training");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jToolBar1.setRollover(true);

        toolTrain.setText("Train");
        toolTrain.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        jToolBar1.add(toolTrain);

        toolClearGraph.setText("Clear graph");
        toolClearGraph.setFocusable(false);
        toolClearGraph.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        toolClearGraph.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(toolClearGraph);

        getContentPane().add(jToolBar1, java.awt.BorderLayout.SOUTH);

        jSplitPane1.setDividerLocation(250);

        jPanel3.setMinimumSize(new java.awt.Dimension(242, 115));
        jPanel3.setOpaque(false);

        jLabel1.setText("Training method:");

        optionTrainingMethod.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Online learning", "Batch learning" }));

        jLabel2.setText("Learning rate:");

        optionLearningRate.setModel(new javax.swing.SpinnerNumberModel(Double.valueOf(0.009999999776482582d), Double.valueOf(0.0010d), null, Double.valueOf(0.0010000000474974513d)));

        jLabel3.setText("Max iterations:");

        optionMaxIterations.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(1000), Integer.valueOf(1), null, Integer.valueOf(100)));

        jLabel4.setText("Max error:");

        optionMaxError.setModel(new javax.swing.SpinnerNumberModel(Double.valueOf(0.01d), Double.valueOf(0.0010d), null, Double.valueOf(0.0010d)));

        optionModifyLearningrate.setText("Modify learning rate");
        optionModifyLearningrate.setActionCommand("toggleLearn");
        optionModifyLearningrate.setOpaque(false);

        optionUseMomentum.setText("Use momentum");
        optionUseMomentum.setOpaque(false);

        optionBatchsize.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(20), Integer.valueOf(1), null, Integer.valueOf(1)));

        jLabel10.setText("Batch size:");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionTrainingMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionBatchsize, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(optionUseMomentum)
                    .addComponent(optionModifyLearningrate)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionMaxError, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionLearningRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionMaxIterations, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(53, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(optionTrainingMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(optionBatchsize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(optionLearningRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(optionMaxIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(optionMaxError, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(optionModifyLearningrate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(optionUseMomentum)
                .addContainerGap(176, Short.MAX_VALUE))
        );

        preferencesTabs.addTab("Preferences", jPanel3);

        jPanel4.setOpaque(false);

        buttonGroup1.add(optionDynamicAdjustment);
        optionDynamicAdjustment.setText("Dynamic adjustment");
        optionDynamicAdjustment.setOpaque(false);

        jLabel6.setText("Multiplier:");

        optionDynamicMultiplier.setModel(new javax.swing.SpinnerNumberModel(1.01d, 0.0d, 2.0d, 0.0010d));
        optionDynamicMultiplier.setPreferredSize(new java.awt.Dimension(80, 20));

        jLabel5.setText("Dynamic reduction factor:");

        optionDynamicReductionfactor.setModel(new javax.swing.SpinnerNumberModel(0.99d, 0.0d, 1.0d, 0.0010d));
        optionDynamicReductionfactor.setPreferredSize(new java.awt.Dimension(80, 20));

        buttonGroup1.add(optionStaticAdjustment);
        optionStaticAdjustment.setSelected(true);
        optionStaticAdjustment.setText("Static adjustment");
        optionStaticAdjustment.setOpaque(false);

        jLabel9.setText("Iterations:");
        jLabel9.setMaximumSize(new java.awt.Dimension(64, 15));
        jLabel9.setMinimumSize(new java.awt.Dimension(64, 15));

        optionStaticIterations.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(20), Integer.valueOf(1), null, Integer.valueOf(1)));
        optionStaticIterations.setPreferredSize(new java.awt.Dimension(80, 20));

        jLabel8.setText("Static reduction factor:");

        optionStaticReductionfactor.setModel(new javax.swing.SpinnerNumberModel(0.99d, 0.0d, 1.0d, 0.0010d));
        optionStaticReductionfactor.setPreferredSize(new java.awt.Dimension(80, 20));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(optionStaticAdjustment)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionDynamicMultiplier, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionDynamicReductionfactor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(optionDynamicAdjustment)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionStaticIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(optionStaticReductionfactor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(26, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(optionDynamicAdjustment, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(optionDynamicMultiplier, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(optionDynamicReductionfactor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(optionStaticAdjustment)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(optionStaticIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(optionStaticReductionfactor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(193, Short.MAX_VALUE))
        );

        preferencesTabs.addTab("Learning rate", jPanel4);

        jPanel5.setMinimumSize(new java.awt.Dimension(112, 20));
        jPanel5.setOpaque(false);
        jPanel5.setPreferredSize(new java.awt.Dimension(160, 20));

        jLabel7.setText("Momentum:");

        optionMomentum.setModel(new javax.swing.SpinnerNumberModel(0.8d, 0.0d, 1.0d, 0.0010d));
        optionMomentum.setPreferredSize(new java.awt.Dimension(80, 20));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(optionMomentum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(94, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(optionMomentum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(328, Short.MAX_VALUE))
        );

        preferencesTabs.addTab("Momentum", jPanel5);

        jSplitPane1.setLeftComponent(preferencesTabs);
        preferencesTabs.getAccessibleContext().setAccessibleName("preferencesTab");

        graphPanel.setPreferredSize(new java.awt.Dimension(300, 300));
        graphPanel.setLayout(new java.awt.BorderLayout());
        jSplitPane1.setRightComponent(graphPanel);

        getContentPane().add(jSplitPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JPanel graphPanel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JSpinner optionBatchsize;
    private javax.swing.JRadioButton optionDynamicAdjustment;
    private javax.swing.JSpinner optionDynamicMultiplier;
    private javax.swing.JSpinner optionDynamicReductionfactor;
    private javax.swing.JSpinner optionLearningRate;
    private javax.swing.JSpinner optionMaxError;
    private javax.swing.JSpinner optionMaxIterations;
    private javax.swing.JCheckBox optionModifyLearningrate;
    private javax.swing.JSpinner optionMomentum;
    private javax.swing.JRadioButton optionStaticAdjustment;
    private javax.swing.JSpinner optionStaticIterations;
    private javax.swing.JSpinner optionStaticReductionfactor;
    private javax.swing.JComboBox optionTrainingMethod;
    private javax.swing.JCheckBox optionUseMomentum;
    private javax.swing.JTabbedPane preferencesTabs;
    private javax.swing.JButton toolClearGraph;
    private javax.swing.JButton toolTrain;
    // End of variables declaration//GEN-END:variables

}
